/*
 * @Author: liuying 247220246@qq.com
 * @Date: 2025-03-07 14:43:33
 * @LastEditors: liuying 247220246@qq.com
 * @LastEditTime: 2025-04-21 18:29:17
 * @FilePath: \my-book-react\src\stores\store.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { Middleware } from '@reduxjs/toolkit';
import configStore from '@/stores/configStore';
import counterReducer from '@/stores/slices/counterSlice';
// import searchReducer from '@/stores/slices/searchSlice';
const middleware: Middleware[] = [];
const rootReducers = {
  counter: counterReducer,
  // search: searchReducer,
};
// export const store = configureStore({
//   reducer: rootReducers,
//   middleware,
// });
export const store = configStore(rootReducers, middleware);
export type AppState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
